package cn.itenzo.good.service;

import cn.itenzo.common.vo.RetMsg;
import cn.itenzo.good.model.Good;
import com.github.pagehelper.PageInfo;

import java.math.BigDecimal;
import java.util.Map;

/**
 * Created by ENZO on 2017/5/23.
 */
public interface GoodService {

    RetMsg addGood(Good entity);


    /**
     * 修改商品价格
     *
     * @param goodId
     * @param price
     * @return
     * @throws Exception
     */
    RetMsg updatePrice(Long goodId, BigDecimal price) throws Exception;


    /**
     * 修改商品名称
     *
     * @param goodId
     * @param goodName
     * @return
     * @throws Exception
     */
    RetMsg updateGoodName(Long goodId, String goodName) throws Exception;

    /**
     * 修改整个商品
     *
     * @param entity
     * @return
     * @throws Exception
     */
    Map updateGood(Good entity) throws Exception;


    /**
     * 推荐
     *
     * @param goodId
     * @return
     */
    RetMsg recommend(Long goodId) throws Exception;


    /**
     * 取消推荐
     *
     * @param goodId
     * @return
     */
    RetMsg unReCommend(Long goodId) throws Exception;


    /**
     * 商品上架
     * @param goodId
     * @return
     * @throws Exception
     */
    RetMsg pushGood(Long goodId) throws Exception;

    /**
     * 批量上架商品
     * @param goodId
     * @return
     * @throws Exception
     */

    Map bathPushGood(Long[] goodId) throws Exception;


    /**
     * 下架商品
     * @param goodId
     * @return
     * @throws Exception
     */
    RetMsg pushDownGood(Long goodId) throws Exception;


    /**
     * 批量下架商品
     * @param goodId
     * @return
     * @throws Exception
     */
    Map bathPushDownGood(Long[] goodId) throws Exception;


    PageInfo<Good> queryPageByStore(Good good, int page, int limit, String orderClause);
}
